﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CustomExample.aspx.cs" Inherits="CustomExample" %>

<%@ Register TagPrefix="mobile"
    Namespace="System.Web.UI.MobileControls"
    Assembly="System.Web.Mobile" %>
   
<mobile:Form id="Form1" runat="server">
    <mobile:Label runat="server">
        Enter an integer
     </mobile:Label>
    <mobile:TextBox id="number" runat="server"/>
    <mobile:CustomValidator id="CustomValidator1"
        runat="server"
        ErrorMessage="Not a factor of four"
        ControlToValidate="number"
        OnServerValidate="ServerValidate"/>
    <mobile:Command id="Command1"
        OnClick="Command1_Click" runat="server">
        Submit
    </mobile:Command>
</mobile:Form>
   
<mobile:Form id="Form2" runat="server">
    <mobile:Label runat="server">
        A factor of four.
    </mobile:Label>
</mobile:Form>